/*    */ package com.zimbra.cs.account.ldap.upgrade;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.account.Config;
/*    */ import com.zimbra.cs.account.ldap.LdapProv;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class BUG_46961
/*    */   extends UpgradeOp
/*    */ {
/*    */   void doUpgrade()
/*    */     throws ServiceException
/*    */   {
/* 30 */     Config config = this.prov.getConfig();
/*    */     
/* 32 */     String oldValue = "displayName,cn=fullName";
/* 33 */     String newValue = "displayName,cn=fullName,fullName2,fullName3,fullName4,fullName5,fullName6,fullName7,fullName8,fullName9,fullName10";
/*    */     
/* 35 */     String[] curValues = config.getMultiAttr("zimbraGalLdapAttrMap");
/*    */     
/* 37 */     for (String value : curValues) {
/* 38 */       if (value.equalsIgnoreCase(oldValue)) {
/* 39 */         Map<String, Object> attr = new HashMap();
/* 40 */         attr.put("-zimbraGalLdapAttrMap", oldValue);
/* 41 */         attr.put("+zimbraGalLdapAttrMap", newValue);
/*    */         
/* 43 */         this.printer.println("Modifying zimbraGalLdapAttrMap on global config:");
/* 44 */         this.printer.println("    removing value: " + oldValue);
/* 45 */         this.printer.println("    adding value: " + newValue);
/* 46 */         this.prov.modifyAttrs(config, attr);
/*    */       }
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/ldap/upgrade/BUG_46961.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */